package com.badger.generator.enums;

/**
 * 根据sql查询出的数据，不同的数据，对应的字段的key
 * @author liqi
 *
 */
public enum DataBaseFieldEnum {
    /**mysql.*/
    MYSQL("NAME", "COMMENT", "FIELD", "TYPE", "COMMENT", "KEY", "NULL"),
    /**oracle.*/
    ORACLE("TABLE_NAME", "COMMENTS", "COLUMN_NAME", "DATA_TYPE", "COMMENTS", "KEY", ""),
    /**postgre_sql.*/
    POSTGRE_SQL("tablename", "comments", "name", "type", "comment", "key", "attnotnull");

    /**表名对应的JDBC字段.*/
    private String tableName;
    /**表注释对应的JDBC字段.*/
    private String tableComment;
    /**表的字段名对应的JDBC字段.*/
    private String fieldName;
    /**表的字段类型对应的JDBC字段.*/
    private String fieldType;
    /**表的字段注释对应的JDBC字段.*/
    private String fieldComment;
    /**表的字段是否是主键对应的JDBC字段.*/
    private String fieldKey;
    /**表的字段对应是否为空*/
    private String fieldIsNull;

    private DataBaseFieldEnum(String tableName, String tableComment, String fieldName, String fieldType,
            String fieldComment, String fieldKey, String fieldIsNull) {
        this.tableName = tableName;
        this.tableComment = tableComment;
        this.fieldName = fieldName;
        this.fieldType = fieldType;
        this.fieldComment = fieldComment;
        this.fieldKey = fieldKey;
        this.fieldIsNull = fieldIsNull;
    }

    public String getFieldIsNull() {
        return fieldIsNull;
    }

    public void setFieldIsNull(String fieldIsNull) {
        this.fieldIsNull = fieldIsNull;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableComment() {
        return tableComment;
    }

    public void setTableComment(String tableComment) {
        this.tableComment = tableComment;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public String getFieldComment() {
        return fieldComment;
    }

    public void setFieldComment(String fieldComment) {
        this.fieldComment = fieldComment;
    }

    public String getFieldKey() {
        return fieldKey;
    }

    public void setFieldKey(String fieldKey) {
        this.fieldKey = fieldKey;
    }

}
